import { App } from "vue";
import {
  Tabbar,
  TabbarItem,
  Form,
  Field,
  Button,
  Picker,
  Icon,
  List,
  Cell,
  PullRefresh,
  CellGroup,
  Popup,
  DatetimePicker,
  NumberKeyboard,
  Dialog,
  NavBar,
  Rate,
  Collapse,
  CollapseItem,
  Tag
} from "vant";
let plugins = [
  Tabbar,
  TabbarItem,
  Form,
  Field,
  Button,
  Picker,
  Icon,
  List,
  PullRefresh,
  Cell,
  CellGroup,
  Popup,
  DatetimePicker,
  NumberKeyboard,
  Dialog,
  NavBar,
  Rate,
  Collapse,
  CollapseItem,
  Tag
];
export const vantPlugins = {
  install: function(vm: App) {
    plugins.forEach((item) => {
      vm.component(item.name, item);
    });
  }
};
